package com.mianshi;

public class yongyou {
    public static void main(String[] args) {
        int[] nums = {2,4,8,6,5};
        System.out.println(seriesnum(nums));
    }

    public static boolean seriesnum (int[] nums) {
        // write code here
        int min=Integer.MAX_VALUE, max=Integer.MIN_VALUE;
        for(int item : nums){
            if(item == 8){
                continue;
            }
            if(item > max){
                max = item;
            }
            if(item < min){
                min = item;
            }
        }
        return (max - min) < 5 ? true : false;
    }
}
